
        appcan.button(".nav-btn", "btn-act", function() {
            //appcan.window.close(-1);
        })
        var statu=1;//定义一个初始的提交状态码
        appcan.button("#btn", "btn-act", function(){
           tijiao();
        })
      //当前窗口的倒计时
     //获取当前窗口的倒计时
      var min;
      var examId=appcan.locStorage.getVal("examId");
      var sec;
      var data=JSON.parse(appcan.locStorage.getVal("dataLIst"));
      //在有值的情况下:
      if(data !=""&&data !=null&&data !=undefined && data !="undefined" && JSON.stringify(data)!="{}"){
          if(data[examId]){
            min=Number(data[examId].min);
            sec=Number(data[examId].sec);
          }else{
            (appcan.locStorage.getVal("examTime")==null)? min=30-1: min=appcan.locStorage.getVal("examTime")-1;
          sec=60;
          }
      }else{
        (appcan.locStorage.getVal("examTime")==null)? min=30-1: min=appcan.locStorage.getVal("examTime")-1;
          sec=60;
      }


      var timer=setInterval(run,1000);  
      //设置一个倒计时的函数
      function run(){
        sec--;
        (sec<10)?$(".sec").html("0"+sec):$(".sec").html(sec);
        (sec<=0)?(sec=60,min--):sec=sec;
        (min<10)?($(".min").html("0"+min)):$(".min").html(min);
        (min<=0)?Back():$(".min").min=min;
     };
     function Back(){
       clearInterval(timer);
          sec=0;
          appcan.window.confirm("提示","考试时间结束,系统自动交卷..","确定",function(){
             submitPaper();
          })
     }
           
           
           
           
           
        
          
           
       
      
   
 